Image recognition method and apparatus, device and non-volatile computer storage medium

ABSTRACT

The present disclosure provides an image recognition method and apparatus, a device and a non-volatile computer storage medium. In embodiments of the present disclosure, it is feasible to obtain the to-be-recognized image of a designated size, extract the different-area image from the to-be-recognized image, and obtain the image feature of the different-area image according to the different-area image, so as to obtain the recognition result of the to-be-recognized image, according to the image feature of the different-area image and a preset template feature. In this way, recognition processing can be performed for images in a limited number of classes without employing the deep learning method based on hundreds of thousands of even millions of training samples.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the U.S. national phase of PCT Application No.PCT/CN2016/082969 filed on May 23, 2016, which claims priority toChinese Patent Application No. 201610143523.0 filed on Mar. 14, 2016,the disclosures of which are incorporated in their entirety by referenceherein.

FIELD OF THE DISCLOSURE

The present disclosure relates to image processing technologies, andparticularly to an image recognition method and apparatus, a device anda non-volatile computer storage medium.

BACKGROUND OF THE DISCLOSURE

In recent years, use of a deep learning method achieves excellentresults in the field of image recognition. The deep learning has highrequirements for the number of training samples, and it usually requireshundreds of thousands of even millions of training samples.

However, in the case of a limited number of classes of images, thenumber of training samples is also very limited, and it is improper toemploy the deep learning method to perform recognition processing forthe images in the limited number of classes. Hence, it is desirable toprovide an image recognition method to perform recognition processingfor the images in the limited number of classes.

SUMMARY OF THE DISCLOSURE

A plurality of aspects of the present disclosure provide an imagerecognition method and apparatus, a device and a non-volatile computerstorage medium, to perform recognition processing for images in alimited number of classes.

According to an aspect of the present disclosure, there is provided animage recognition method, comprising:

obtaining a to-be-recognized image of a designated size;

extracting a different-area image from the to-be-recognized image;

obtaining an image feature of the different-area image according to thedifferent-area image;

obtaining a recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature.

The above aspect and any possible implementation mode further provide animplementation mode: the obtaining a to-be-recognized image of adesignated size comprises:

using affine transform to adjust the obtained to-be-recognized image ofany size as the to-be-recognized image of the designated size.

The above aspect and any possible implementation mode further provide animplementation mode: the extracting a different-area image from theto-be-recognized image comprises:

extracting the different-area image from the to-be-recognized image,according to a pre-designated area location.

The above aspect and any possible implementation mode further provide animplementation mode: the obtaining an image feature of thedifferent-area image according to the different-area image comprises:

obtaining an image feature of the different-area image by using a modelobtained by training from a general data set, according to thedifferent-area image.

The above aspect and any possible implementation mode further provide animplementation mode: before obtaining a recognition result of theto-be-recognized image, according to the image feature of thedifferent-area image and a preset template feature, the method furthercomprises:

obtaining template images of at least two designated classes;

extracting a template area image of each designated class from thetemplate image of said each designated class in the at least twodesignated classes; and

obtaining a template feature of said each designated class according tothe template area image of said each designated class.

According to another aspect of the present disclosure, there is providedan image recognition apparatus, comprising:

an obtaining unit configured to obtain a to-be-recognized image of adesignated size;

an extracting unit configured to extract a different-area image from theto-be-recognized image;

a feature unit configured to obtain an image feature of thedifferent-area image according to the different-area image;

a recognition unit configured to obtain a recognition result of theto-be-recognized image, according to the image feature of thedifferent-area image and a preset template feature.

The above aspect and any possible implementation mode further provide animplementation mode: the obtaining unit is specifically configured to

use affine transform to adjust the obtained to-be-recognized image ofany size as the to-be-recognized image of the designated size.

The above aspect and any possible implementation mode further provide animplementation mode: the extracting unit is specifically configured to

extract the different-area image from the to-be-recognized image,according to a pre-designated area location.

The above aspect and any possible implementation mode further provide animplementation mode: the feature unit is specifically configured to

obtain an image feature of the different-area image by using a modelobtained by training from a general data set, according to thedifferent-area image.

The above aspect and any possible implementation mode further provide animplementation mode: the feature unit is further configured to

obtain template images of at least two designated classes;

extract a template area image of each designated class from the templateimage of said each designated class in the at least two designatedclasses; and

obtain a template feature of said each designated class according to thetemplate area image of said each designated class.

According to a further aspect of the present disclosure, there isprovided a device, comprising

one or more processor;

a memory;

one or more programs stored in the memory and configured to execute thefollowing operations when executed by the one or more processors:

obtaining a to-be-recognized image of a designated size;

extracting a different-area image from the to-be-recognized image;

obtaining an image feature of the different-area image according to thedifferent-area image;

obtaining a recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature.

According to a further aspect of the present disclosure, there isprovided a non-volatile computer storage medium in which one or moreprograms are stored, an apparatus being enabled to execute the followingoperations when said one or more programs are executed by the apparatus:

obtaining a to-be-recognized image of a designated size;

extracting a different-area image from the to-be-recognized image;

obtaining an image feature of the different-area image according to thedifferent-area image;

obtaining a recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature.

As known from the above technical solutions, in embodiments of thepresent disclosure, it is feasible to obtain the to-be-recognized imageof a designated size, extract the different-area image from theto-be-recognized image, and obtain the image feature of thedifferent-area image according to the different-area image, so as toobtain the recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature. In this way, recognition processing can be performed for imagesin a limited number of classes without employing the deep learningmethod based on hundreds of thousands of even millions of trainingsamples.

In addition, the technical solutions provided by the present disclosuredo not require purposefully collecting large-scale training samples andusing the deep learning method to train these training samples to obtainthe model. Instead, the technical solutions provided by the presentdisclosure may use the model obtained by training from the general dataset, thereby removing the workload of performing data collection incollecting the training samples on a large scale and training the model,and effectively quickening the algorithm development time of the imagerecognition processing.

In addition, according to the technical solutions provided by thepresent disclosure, the accuracy of image recognition processing can beensured effectively by manually pre-designating the area location havinga larger differentiation.

BRIEF DESCRIPTION OF DRAWINGS

To describe technical solutions of embodiments of the present disclosuremore clearly, figures to be used in the embodiments or in depictionsregarding the prior art will be described briefly. Obviously, thefigures described below are only some embodiments of the presentdisclosure. Those having ordinary skill in the art appreciate that otherfigures may be obtained from these figures without making inventiveefforts.

FIG. 1 is a flow chart of an image recognition method according to anembodiment of the present disclosure;

FIG. 2 is a structural schematic diagram of an image recognitionapparatus according to another embodiment of the present disclosure;

FIG. 3 is a schematic diagram of a different-area image in theembodiment corresponding to FIG. 1.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

To make objectives, technical solutions and advantages of embodiments ofthe present disclosure clearer, technical solutions of embodiment of thepresent disclosure will be described clearly and completely withreference to figures in embodiments of the present disclosure.Obviously, embodiments described here are partial embodiments of thepresent disclosure, not all embodiments. All other embodiments obtainedby those having ordinary skill in the art based on the embodiments ofthe present disclosure, without making any inventive efforts, fallwithin the protection scope of the present disclosure.

It needs to be appreciated that the terminals involved in theembodiments of the present disclosure comprise but are not limited to amobile phone, a Personal Digital Assistant (PDA), a wireless handhelddevice, a tablet computer, a Personal Computer (PC), an MP3 player, anMP4 player, and a wearable device (e.g., a pair of smart glasses, asmart watch, or a smart bracelet).

In addition, the term “and/or” used in the text is only an associationrelationship depicting associated objects and represents that threerelations might exist, for example, A and/or B may represents threecases, namely, A exists individually, both A and B coexist, and B existsindividually. In addition, the symbol “/” in the text generallyindicates associated objects before and after the symbol are in an “or”relationship.

FIG. 1 is a flow chart of an image recognition method according to anembodiment of the present disclosure. As shown in FIG. 1, the methodcomprises the following steps:

101: obtaining a to-be-recognized image of a designated size.

The so-called image refers to a file formed by employing a certain imageformat and storing image data, namely image pixels, in a certain manner,and may also be called an image file.

The image format of the image, namely, a format in which the image isstored, may include but not limited to: Bitmap (BMP) format, PortableNetwork Graphic Format (PNG), Joint Photographic Experts Group (JPEG)format, and Exchangeable Image File Format (EXIF). This is notparticularly defined in the present embodiment.

102: extracting a different-area image from the to-be-recognized image.

103: obtaining an image feature of the different-area image according tothe different-area image.

104: obtaining a recognition result of the to-be-recognized image,according to the image feature of the different-area image and a presettemplate feature.

It needs to be appreciated that a subject for executing 101-104 may bean application located at a local terminal, or a function unit such as aplug-in or Software Development Kit (SDK) arranged in the applicationlocated at the local terminal, or a processing engine located in anetwork-side server, or a distributed type system located on the networkside. This is not particularly limited in the present embodiment.

It may be understood that the application may be a native application(nativeAPP) installed on the terminal, or a webpage program (webApp) ofa browser on the terminal. This is not particularly limited in thepresent embodiment.

As such, it is feasible to obtain the to-be-recognized image of adesignated size, extract a different-area image from theto-be-recognized image, and obtain the image feature of thedifferent-area image according to the different-area image, so as toobtain the recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature. In this way, recognition processing can be performed for imagesin a limited number of classes without employing the deep learningmethod based on hundreds of thousands of even millions of trainingsamples.

In the present disclosure, the to-be-recognized image may be collectedby using an image sensor. The image sensor may be a Charge CoupledDevice (CCD) sensor, or a Complementary Metal-Oxide Semiconductor (CMOS)sensor. This is not particularly limited in the present embodiment.

In addition to a target object corresponding to the to-be-recognizedimage, the collected image usually further includes some other objectsas background images, for example. For example, an image of a personwith a sheet of Chinese paper money in hand includes the target object,namely, the sheet of Chinese paper money corresponding to theto-be-recognized image, and might further include some other objectssuch as the person's hand and cashier desk as background images. Hence,it is necessary to further employ a conventional image detection method,e.g., a Scale-Invariant Feature Transform (SIFT) algorithm, to find thearea of the target object in the image, as the to-be-recognized image.

Optionally, in a possible implementation mode of the present embodiment,in 101, it is specifically possible to use affine transform to adjustthe obtained to-be-recognized image of any size as the to-be-recognizedimage of the designated size.

Specifically speaking, the affine transform may be implemented bycombining a series of atomic transformations, and may specificallyinclude but not limited to at least one of translation, scale, flip,rotation and shear.

Optionally, in a possible implementation mode of the present embodiment,in 102, it is specifically feasible to extract the different-area imagefrom the to-be-recognized image, according to a pre-designated arealocation.

In a specific implementation, before 102, it is feasible to furthermanually pre-designate an area location having a larger differentiation.As shown by a solid-line box shown in FIG. 3, the area location may becalibrated by employing various geometrical shapes.

For example, the area location may be calibrated with a location of arectangular box, namely, a left upper corner (x1, y1), and a right lowercorner (x2, y2). To facilitate calculation, proportion may be employedto describe the left upper corner (x1, y1) as (x1/width, y1/height), anddescribe the right lower corner (x2, y2) as (x2/width, y2/height),wherein width and height are an image length of a template image and animage width of the template image.

As such, the accuracy of the image recognition processing can beeffectively ensured by manually pre-designating the area location havinga larger differentiation.

In this implementation mode, after the area location having a largerdifferentiation is manually pre-designated, it is specifically feasibleto position the area location from the to-be-recognized image accordingto the pre-designated area location, and then extract the image coveredby the area location, as the different-area image.

Optionally, in a possible implementation mode of the present embodiment,in 103, it is specifically possible to obtain an image feature of thedifferent-area image by using a model obtained by training from ageneral data set, according to the different-area image.

In this implementation mode, before 103, it is necessary to performsample training with a deep learning algorithm based on the currentgeneral data set, to obtain a model, for example, a model obtained bytraining with a Deep Neural Network (CDNN) based on a data set disclosedby ImageNet (currently the largest data database in data recognition).Generally, the model can be obtained very easily.

Optionally, in a possible implementation mode of the present embodiment,before 104, it is feasible to further obtain template images of at leasttwo designated classes, and then extract a template area image of eachdesignated class from the template image of each designated class in theat least two designated classes. Then, it is feasible to obtain atemplate feature of said each designated class according to the templatearea image of the each designated class.

In this implementation mode, it is specifically to extract the templatearea image of the each designated class from the template image of eachdesignated class, according to the pre-designated area location. Then,it is feasible to use the obtained model to obtain the template featureof said each designated class, according to the template area image.

Specifically, in 104, it is specifically feasible to measure a distancefor the image feature of the different-area image and a preset templatefeature, to obtain a template feature with the nearest distance, andthen regard the class of the template image to which the templatefeature belongs, as a recognition result.

In the present embodiment, it is feasible to obtain the to-be-recognizedimage of a designated size, extract the different-area image from theto-be-recognized image, and obtain the image feature of thedifferent-area image according to the different-area image, so as toobtain the recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature. In this way, recognition processing can be performed for imagesin a limited number of classes without employing the deep learningmethod based on hundreds of thousands of even millions of trainingsamples.

In addition, the technical solution provided by the present disclosuredoes not require purposefully collecting large-scale training samplesand using the deep learning method to train these training samples toobtain the model. Instead, the technical solution provided by thepresent disclosure may use the model obtained by training from thegeneral data set, thereby removing the workload of performing datacollection in collecting the training samples on a large scale andtraining the model, and effectively quickening the algorithm developmenttime of the image recognition processing.

In addition, according to the technical solution provided by the presentdisclosure, the accuracy of image recognition processing can be ensuredeffectively by manually pre-designating the area location having alarger differentiation.

It needs to be appreciated that regarding the aforesaid methodembodiments, for ease of description, the aforesaid method embodimentsare all described as a combination of a series of actions, but thoseskilled in the art should appreciated that the present disclosure is notlimited to the described order of actions because some steps may beperformed in other orders or simultaneously according to the presentdisclosure. Secondly, those skilled in the art should appreciate theembodiments described in the description all belong to preferredembodiments, and the involved actions and modules are not necessarilyrequisite for the present disclosure.

In the above embodiments, different emphasis is placed on respectiveembodiments, and reference may be made to related depictions in otherembodiments for portions not detailed in a certain embodiment.

FIG. 2 is a structural schematic diagram of an image recognitionapparatus according to another embodiment of the present disclosure. Asshown in FIG. 2, the image recognition apparatus of the presentembodiment may include an obtaining unit 21, an extracting unit 22, afeature unit 23 and a recognition unit 24, wherein the obtaining unit 21is configured to obtain a to-be-recognized image of a designated size;the extracting unit 22 is configured to extract a different-area imagefrom the to-be-recognized image; the feature unit 23 is configured toobtain an image feature of the different-area image according to thedifferent-area image; the recognition unit 24 is configured to obtain arecognition result of the to-be-recognized image, according to the imagefeature of the different-area image and a preset template feature.

It needs to be appreciated that the image recognition apparatusaccording to the present embodiment may be an application located at alocal terminal, or a function unit such as a plug-in or SoftwareDevelopment Kit (SDK) arranged in the application located at the localterminal, or a processing engine located in a network-side server, or adistributed type system located on the network side. This is notparticularly limited in the present embodiment.

It may be understood that the application may be a native application(nativeAPP) installed on the terminal, or a webpage program (webApp) ofa browser on the terminal. This is not particularly limited in thepresent embodiment.

Optionally, in a possible implementation mode of the present embodiment,the obtaining unit 21 may specifically be configured to use affinetransform to adjust the obtained to-be-recognized image of any size asthe to-be-recognized image of the designated size.

Optionally, in a possible implementation mode of the present embodiment,the extracting unit 22 may specifically be configured to extract thedifferent-area image from the to-be-recognized image, according to apre-designated area location.

Optionally, in a possible implementation mode of the present embodiment,the feature unit 23 may specifically be configured to obtain an imagefeature of the different-area image by using a model obtained bytraining from a general data set, according to the different-area image.

Optionally, in a possible implementation mode of the present embodiment,the feature unit 23 may be further configured to obtain template imagesof at least two designated classes; extract a template area image ofsaid each designated class from the template image of each designatedclass in the at least two designated classes; and obtain a templatefeature of said each designated class according to the template areaimage of said each designated class.

It needs to be appreciated that the method in the embodimentcorresponding to FIG. 1 may be implemented by the image recognitionapparatus provided in the present embodiment. For detailed description,please refer to relevant content in the embodiment corresponding to FIG.1, and no detailed description will be presented any longer.

In the present embodiment, the obtaining unit obtains theto-be-recognized image of a designated size, the extracting unitextracts the different-area image from the to-be-recognized image, andthe feature unit obtains the image feature of the different-area imageaccording to the different-area image, so that the recognition unit canobtain the recognition result of the to-be-recognized image, accordingto the image feature of the different-area image and a preset templatefeature. In this way, recognition processing can be performed for imagesin a limited number of classes without employing the deep learningmethod based on hundreds of thousands of even millions of trainingsamples.

In addition, the technical solution provided by the present disclosuredoes not require purposefully collecting large-scale training samplesand using the deep learning method to train these training samples toobtain the model. Instead, the technical solution provided by thepresent disclosure may use the model obtained by training from thegeneral data set, thereby removing the workload of performing datacollection in collecting the training samples on a large scale andtraining the model, and effectively quickening the algorithm developmenttime of the image recognition processing.

In addition, according to the technical solution provided by the presentdisclosure, the accuracy of image recognition processing can be ensuredeffectively by manually pre-designating the area location having alarger differentiation.

Those skilled in the art can clearly understand that for purpose ofconvenience and brevity of depictions, reference may be made tocorresponding procedures in the aforesaid method embodiments forspecific operation procedures of the system, apparatus and unitsdescribed above, which will not be detailed any more.

In the embodiments provided by the present disclosure, it should beunderstood that the revealed system, apparatus and method can beimplemented in other ways. For example, the above-described embodimentsfor the apparatus are only exemplary, e.g., the division of the units ismerely logical one, and, in reality, they can be divided in other waysupon implementation. For example, a plurality of units or components maybe combined or integrated into another system, or some features may beneglected or not executed. In addition, mutual coupling or directcoupling or communicative connection as displayed or discussed may beindirect coupling or communicative connection performed via someinterfaces, means or units and may be electrical, mechanical or in otherforms.

The units described as separate parts may be or may not be physicallyseparated, the parts shown as units may be or may not be physical units,i.e., they can be located in one place, or distributed in a plurality ofnetwork units. One can select some or all the units to achieve thepurpose of the embodiment according to the actual needs.

Further, in the embodiments of the present disclosure, functional unitscan be integrated in one processing unit, or they can be separatephysical presences; or two or more units can be integrated in one unit.The integrated unit described above can be implemented in the form ofhardware, or they can be implemented with hardware plus softwarefunctional units.

The aforementioned integrated unit in the form of software functionunits may be stored in a computer readable storage medium. Theaforementioned software function units are stored in a storage medium,including several instructions to instruct a computer device (a personalcomputer, server, or network equipment, etc.) or processor to performsome steps of the method described in the various embodiments of thepresent disclosure. The aforementioned storage medium includes variousmedia that may store program codes, such as U disk, removable hard disk,Read-Only Memory (ROM), a Random Access Memory (RAM), magnetic disk, oran optical disk.

Finally, it is appreciated that the above embodiments are only used toillustrate the technical solutions of the present disclosure, not tolimit the present disclosure; although the present disclosure isdescribed in detail with reference to the above embodiments, thosehaving ordinary skill in the art should understand that they still canmodify technical solutions recited in the aforesaid embodiments orequivalently replace partial technical features therein; thesemodifications or substitutions do not cause essence of correspondingtechnical solutions to depart from the spirit and scope of technicalsolutions of embodiments of the present disclosure.

What is claimed is:
 1. An image recognition method, wherein the methodcomprises: obtaining a to-be-recognized image of a designated size;extracting a different-area image from the to-be-recognized image;obtaining an image feature of the different-area image according to thedifferent-area image; and obtaining a recognition result of theto-be-recognized image, according to the image feature of thedifferent-area image and a preset template feature, wherein theextracting the different-area image from the to-be-recognized imagecomprises: positioning an area location from the to-be-recognized imageaccording to a manually pre-designated area location having a largerdifferentiation, the to-be-recognized image containing a target objectand other objects in addition to the target object, wherein thedifferentiation is relative to other objects contained in theto-be-recognized image, and then extracting, only considering the arealocation of the to-be-recognized image containing only the targetobject, the image covered by the area location as the different-areaimage, wherein the extracting the different-area image from theto-be-recognized image further comprises employing a Scale-InvariantFeature Transform (SIFT) algorithm, wherein the obtaining theto-be-recognized image of the designated size comprises: using affinetransform to adjust the obtained to-be-recognized image of any size asthe to-be-recognized image of the designated size, wherein the using theaffine transform comprises applying a series of atomic transformationsto the obtained to-be-recognized image, the series of atomictransformations including translation, scale, flip, rotation, and shear,wherein the obtaining the image feature of the different-area imageaccording to the different-area image comprises: obtaining the imagefeature of the different-area image by using a model obtained bytraining a Deep Neural Network from a general data set, according to thedifferent-area image, wherein obtaining the recognition result of theto-be-recognized image comprises: obtaining template images of at leasttwo designated classes; extracting a template area image of eachdesignated class from the template image of said each designated classin the at least two designated classes according to the manuallypre-designated area location; measuring a distance between the imagefeature of the different-area image and an image feature of each of therespective template area images; obtaining a template feature having anearest distance among the measured distances; and regarding thedesignated class corresponding to the template feature having thenearest distance as the recognition result.
 2. A device, comprising oneor more processor; a memory; one or more programs stored in the memoryand configured to execute an image recognition method, wherein themethod comprises: obtaining a to-be-recognized image of a designatedsize; extracting a different-area image from the to-be-recognized image;obtaining an image feature of the different-area image according to thedifferent-area image; and obtaining a recognition result of theto-be-recognized image, according to the image feature of thedifferent-area image and a preset template feature, wherein theextracting the different-area image from the to-be-recognized imagecomprises: positioning an area location from the to-be-recognized imageaccording to a manually pre-designated area location having a largerdifferentiation, the to-be-recognized image containing a target objectand other objects in addition to the target object, wherein thedifferentiation is relative to the other objects contained in theto-be-recognized image, and then extracting, only considering the arealocation of the to-be-recognized image containing only the targetobject, the image covered by the area location as the different-areaimage, wherein the extracting the different-area image from theto-be-recognized image further comprises employing a Scale-InvariantFeature Transform (SIFT) algorithm, wherein the obtaining theto-be-recognized image of the designated size comprises: using affinetransform to adjust the obtained to-be-recognized image of any size asthe to-be-recognized image of the designated size, wherein the using theaffine transform comprises applying a series of atomic transformationsto the obtained to-be-recognized image, the series of atomictransformations including translation, scale, flip, rotation, and shear,wherein the obtaining the image feature of the different-area imageaccording to the different-area image comprises: obtaining the imagefeature of the different-area image by using a model obtained bytraining a Deep Neural Network from a general data set, according to thedifferent-area image, wherein obtaining the recognition result of theto-be-recognized image comprises: obtaining template images of at leasttwo designated classes; extracting a template area image of eachdesignated class from the template image of said each designated classin the at least two designated classes according to the manuallypre-designated area location; measuring a distance between the imagefeature of the different-area image and an image feature of each of therespective template area images; obtaining a template feature having anearest distance among the measured distances; and regarding thedesignated class corresponding to the template feature having thenearest distance as the recognition result.
 3. A non-transitory computerstorage medium in which one or more programs are stored, an apparatusbeing enabled to execute an image recognition method, wherein the methodcomprises: obtaining a to-be-recognized image of a designated size;extracting a different-area image from the to-be-recognized image;obtaining an image feature of the different-area image according to thedifferent-area image; and obtaining a recognition result of theto-be-recognized image, according to the image feature of thedifferent-area image and a preset template feature, wherein theextracting the different-area image from the to-be-recognized imagecomprises: positioning an area location from the to-be-recognized imageaccording to a manually pre-designated area location having a largerdifferentiation, the to-be-recognized image containing a target objectand other objects in addition to the target object, wherein thedifferentiation is relative to other objects contained in theto-be-recognized image, and then extracting, only considering the arealocation of the to-be-recognized image containing only the targetobject, the image covered by the area location as the different-areaimage, wherein the extracting the different-area image from theto-be-recognized image further comprises employing a Scale-InvariantFeature Transform (SIFT) algorithm, wherein the obtaining theto-be-recognized image of the designated size comprises: using affinetransform to adjust the obtained to-be-recognized image of any size asthe to-be-recognized image of the designated size, wherein the using theaffine transform comprises applying a series of atomic transformationsto the obtained to-be-recognized image, the series of atomictransformations including translation, scale, flip, rotation, and shear,wherein the obtaining the image feature of the different-area imageaccording to the different-area image comprises: obtaining the imagefeature of the different-area image by using a model obtained bytraining a Deep Neural Network from a general data set, according to thedifferent-area image, wherein obtaining the recognition result of theto-be-recognized image comprises: obtaining template images of at leasttwo designated classes; extracting a template area image of eachdesignated class from the template image of said each designated classin the at least two designated classes according to the manuallypre-designated area location; measuring a distance between the imagefeature of the different-area image and an image feature of each of therespective template area images; obtaining a template feature having anearest distance among the measured distances; and regarding thedesignated class corresponding to the template feature having thenearest distance as the recognition result.